<!-- report_detail.html -->
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ report.title }}</title>
    <!-- 引入 Chart.js -->
    <script src="{% static 'js/Chart.min.js' %}"></script>
    <!-- 引入 Bootstrap CSS -->
    <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
    <!-- 自定义样式 -->
    <link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
    <div class="container mt-4">
        <h1 class="text-center mb-4">{{ report.title }}</h1>

        <div class="card mb-3">
            <div class="card-body">
                <h5 class="card-title">类型</h5>
                <p class="card-text">{{ report.report_type }}</p>
            </div>
        </div>

        <div class="card mb-3">
            <div class="card-body">
                <h5 class="card-title">概述</h5>
                <p class="card-text">{{ report.summary }}</p>
            </div>
        </div>

        <div class="card mb-3">
            <div class="card-body">
                <h5 class="card-title">详细内容</h5>
                <div class="card-text">{{ report.content|safe }}</div>
            </div>
        </div>

        <div class="alert alert-info">
            <strong>审核状态:</strong> {{ report.is_reviewed|yesno:"已审核,未审核" }}
        </div>

        {% if not report.is_reviewed %}
        <a href="{% url 'review_report' report_id=report.id %}" class="btn btn-primary">审核</a>
        {% endif %}
        <a href="{% url 'delete_report' report_id=report.id %}" class="btn btn-danger" onclick="return confirm('确定要删除该报告吗？')">删除</a>
    </div>


    <!-- 引入 Bootstrap JS 和 Popper.js（用于支持动态组件） -->
    <script src="{% static 'js/jquery.slim.min.js' %}"></script>
    <script src="{% static 'js/popper.min.js' %}"></script>
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
</body>
</html>